package com.cosmoplat.xikai.business.domain;

import com.cosmoplat.xikai.common.core.domain.BaseEntity;

import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @TableName device_thing_model
 */
@Data
public class DeviceThingModel extends BaseEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 设备id
     */
    private Long deviceId;

    /**
     * 类型 1:在线状态 2:参数 3:为报警
     */
    private Integer type;

    /**
     * 标识
     */
    private String identifier;

    /**
     * 编码
     */
    private String code;

    /**
     * 名称
     */
    private String name;

    /**
     * 描述
     */
    private String description;

    /**
     * 点位
     */
    private String point;

    /**
     * 单位
     */
    private String unit;
    /**
     * 点位位数
     */
    private Integer numberOfPoints;
    /**
     * 从机id
     */
    private Integer slaveId;

    /**
     * 逻辑删除标志，默认未删除
     */
    private Boolean isDelete;

    /**
     * 物料编号
     */
    @ApiModelProperty(value = "物料编号", example = "CODE001")
    @NotBlank(message = "配送信息 - 物料编号不能为空")
    private String materialCode;


    private static final long serialVersionUID = 1L;
}
